<%@ page import="${basepackage}.web.admin.constant.Uri" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="/WEB-INF/view/common/_common_prefix.jsp" %>
<div class="bjui-pageHeader">
  <form id="pagerForm" data-toggle="ajaxsearch" action="${r'${root}'}<%=Uri.${table.sqlNameUpperCase}_PAGE_SHOW%>" method="get">
    <div class="bjui-searchBar">

      <button type="button" class="showMoreSearch" data-toggle="moresearch" data-name="custom">
        <i class="fa fa-angle-double-down"></i>
      </button>
      <button type="submit" class="btn-blue" data-icon="search" id="query_base_show">查询</button>
      <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">清空查询</a>

      <div class="bjui-moreSearch">
      </div>

      <div class="pull-right">
        <div class="btn-group">
          <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">更多操作<span class="caret"></span></button>
          <ul class="dropdown-menu right" role="menu">
            <li>
              <a href="${r'${root}'}<%=Uri.${table.sqlNameUpperCase}_ADD_SHOW%>" data-toggle="navtab" data-id="navtab" data-title="新增">新增</a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </form>
</div>

<div class="bjui-pageContent tableContent">
  <table class="table table-bordered table-hover table-striped table-top data_table table_center"  data-selected-multi="true">
    <thead>
    <tr class="line_top">
      <#list table.columns as column>
      <th>${column.columnAlias}</th>
      </#list>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    ${r'<c:forEach items="${list}" var="item">'}
      <tr>
      <#list table.columns as column>
        <#if column.javaType?index_of("Date")!=-1>
          <td><hs:datefmt value="${r'${'}item.${column.columnNameFirstLower}}" type="dateTimeSecPattern"/></td>
        <#else>
          <td><hs:out value="${r'${'}item.${column.columnNameFirstLower}}"/></td>
        </#if>
      </#list>
        <td class="option">
          <a href="${r'${root}'}<%=Uri.${table.sqlNameUpperCase}_DETAIL_SHOW%>?id=${r'${'}item.${table.idColumn.columnNameFirstLower}}" class="btn btn-green" data-toggle="dialog" data-id="${table.sqlNameLowerCase}_detail" data-width="700" data-height="200" data-mask="true" data-confirm-msg="查看">查看</a>
          <a href="${r'${root}'}<%=Uri.${table.sqlNameUpperCase}_UPDATE_SHOW%>?id=${r'${'}item.${table.idColumn.columnNameFirstLower}}" class="btn btn-green" data-toggle="navtab" data-id="navtab" data-title="编辑">编辑</a>
          <a href="${r'${root}'}<%=Uri.${table.sqlNameUpperCase}_DEL_SUBMIT%>?id=${r'${'}item.${table.idColumn.columnNameFirstLower}}" class="btn btn-green" data-toggle="doajax" data-mask="true" data-confirm-msg="确定要删除吗？">软删除</a>
          <a href="${r'${root}'}<%=Uri.${table.sqlNameUpperCase}_DELETE_SUBMIT%>?id=${r'$'}{item.${table.idColumn.columnNameFirstLower}}" class="btn btn-green" data-toggle="doajax" data-mask="true" data-confirm-msg="确定要删除吗？">删除</a>
        </td>
      </tr>
    ${'</c:forEach>'}
    </tbody>
  </table>
</div>
<%@ include file="/WEB-INF/view/common/_page_footer.jsp" %>